package phoenix.web.locators.maturedating;

import org.openqa.selenium.By;
import phoenix.web.locators.base.SearchPageLocatorsBase;

/**
 * Created by AlexGolovko on 01.12.2014.
 */
public class SearchPageLocators extends SearchPageLocatorsBase
{
	public SearchPageLocators()
	{
		blockUserList = By.xpath("//ul[@id='userListContainer']");
		imgSiteLogo = By.xpath("//img[@alt='MatureDating']");

		// Counters
		blockMessagedMeCounter = By.xpath("//span[@data-counter='mail']");
		blockBrowsedMeCounter = By.xpath("//span[@data-counter='view']");
		blockWinkedMeCounter = By.xpath("//span[@data-counter='wink']");
		blockFavoritsCounter = By.xpath("//span[@data-counter='favourite']");

		// Pop-up notifications
		blockMessageAlert = By.xpath("//div[@class='event-notifier notification-popup b-popup active mail']");
		blockWinkAlert = By.xpath("//div[@class='event-notifier notification-popup b-popup active wink']");
		blockBrowseAlert = By.xpath("//div[@class='event-notifier notification-popup b-popup active view']");

		// Search results
		blockBannerUpgrade = By.xpath("//a[@class='btn-send btn-text-orange']");

		txtUserSreenname = By.className("b-screenname");
		txtUserListAge = By.xpath("//div[@class='b-age']");
		txtUserListDistanse = By.xpath("//div[@class='b-miles-away']");
		txtUserCounty = By.xpath("//div[@class='location']/span[@class='country']");

		// Selects
		selectGender = By.xpath("//form[@id='searchForm']/div/div[2]/div[2]/div");
		selectAgeFrom = By.xpath("//div[@data-select-max='searchFormAgeTo']/div/div");
		selectAgeTo = By.xpath("//div[@data-select-min='searchFormAgeFrom']/div/div");

		selectLocation = By.xpath("//input[@name='location']");
		selectLocationValue = By.id("search-form-location-value");
		btnRadius = By.xpath("//form[@id='searchForm']/div/div[5]/div[2]/div");
		btnSearch = By.xpath("//button[@id='searchFormSubmit']");

		// Banners
		btnBanner = By.xpath("//a[@class='btn-send btn-text-orange']");

	}

	@Override
	public By setLocatorByValue(String p_value, By p_baseLocator)
	{
		return By.xpath(p_baseLocator.toString().replace("By.xpath: ", "") + "/ul/li[@data-item='" + p_value + "']");
	}

}
